<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">入库单信息</h3>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-6">
                                <p><strong>入库单号：</strong>{$row.inbound_no}</p>
                                <p><strong>供应商：</strong>{$row.supplier.name}</p>
                                <p><strong>入库日期：</strong>{$row.inbound_date_text}</p>
                            </div>
                            <div class="col-md-6">
                                <p><strong>总金额：</strong>¥{$row.total_amount}</p>
                                <p><strong>状态：</strong>{$row.status_text}</p>
                                <p><strong>备注：</strong>{$row.remark}</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">入库明细</h3>
                    </div>
                    <div class="panel-body">
                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                                <tr>
                                    <th>物料名称</th>
                                    <th>物料编码</th>
                                    <th>申请数量</th>
                                    <th>实际数量</th>
                                    <th>单价</th>
                                    <th>总金额</th>
                                    <th>批次号</th>
                                    <th>质检状态</th>
                                    <th>存放位置</th>
                                    <th>备注</th>
                                </tr>
                            </thead>
                            <tbody>
                                {foreach $row.items as $item}
                                <tr>
                                    <td>{$item.material.name}</td>
                                    <td>{$item.material.code}</td>
                                    <td>{$item.request_quantity}</td>
                                    <td>{$item.actual_quantity}</td>
                                    <td>¥{$item.unit_price}</td>
                                    <td>¥{$item.total_amount}</td>
                                    <td>{$item.batch_no}</td>
                                    <td>{$item.quality_status_text}</td>
                                    <td>{$item.location}</td>
                                    <td>{$item.remark}</td>
                                </tr>
                                {/foreach}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
